package tests;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import utils.Config;

public class ConfigTest {

	private Config config;

	@Before
	public void setup() {
		config = Config.getInstance();

	}

	@Test
	public void testSetDBUserName() {
		Assert.assertEquals("root", config.getDBUserName());
		config.setDBUserName("root");
		Assert.assertEquals("root", config.getDBUserName());
		config.setDBUserName("a1b5");
		Assert.assertNotSame("root", config.getDBUserName());
		Assert.assertEquals("a1b5", config.getDBUserName());
		config.setDBPassword("root");
		config.setDBUserName("root");

	}

	@Test
	public void testSetDBPassword() {
		Assert.assertEquals("root", config.getDBPassword());
		config.setDBPassword("root");
		Assert.assertEquals("root", config.getDBPassword());
		config.setDBPassword("ab123");
		Assert.assertEquals("ab123", config.getDBPassword());
		config.setDBPassword("root");
		config.setDBUserName("root");
	}

}
